package com.flower.ApiGateway.dao;

import javax.transaction.Transactional;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.flower.ApiGateway.entity.UserEntity;

@Transactional
@Repository
public interface UserDao extends JpaSpecificationExecutor<UserEntity>,PagingAndSortingRepository<UserEntity, Integer> {

	/**  
	
	 * <p>Title: findByUsernameAndPasswd</p>  
	
	 * <p>Description: 根据用户名和密码查询账号</p>  
	
	 * @param loginname
	 * @param passwd
	 * @return  
	
	 */  
	UserEntity findByUsernameAndPasswd(String loginname,String passwd);
	
	/**  
	
	 * <p>Title: findByUsername</p>  
	
	 * <p>Description:根据用户名查询帐号 </p>  
	
	 * @param loginname
	 * @return  
	
	 */  
	UserEntity findByUsername(String loginname);
}
